home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Communication / CommFigure / Module Creation < prev    next >
Text File  |  1996-01-07  |  5KB  |  137 lines

  1. CommFigure Module Notation and Creation.
  2.  
  3. A CommFigure Module is a based around a STR# type resource with an ID of 128.
  4. The module must have the creator signature of VOND and a file type of MODL, for
  5. CommFigure to pick them up. They are currently found anywhere on the startup hard disk.
  6. Future versions of CommFigure will restrict them to being only in the modules
  7. folder.
  8.  
  9. The first 6 fields of the STR# resource is header information.
  10.  
  11. Field Number #1        
  12. Description            The module name as seen from within CommFigure
  13. Example                Netscape
  14. Notes                -
  15.  
  16. Field Number #2        
  17. Description            The pathname to the preference file that CommFigure will be
  18.                     editing.
  19. Example                :System Folder:Preferences:Netscape ─:Netscape Preferences
  20. Notes                Due to my lack of programming skills at this time, I have had
  21.                     to assume you will using the Startup Hard Disk, that is 
  22.                     why the Hard Disk name is missing from my example pathname.
  23.  
  24. Field Number #3        
  25. Description            The resource type where the preferences are stored
  26. Example                STR#    or    PREF
  27. Notes                Should be left blank if its a Data Fork type preference
  28.                     file.
  29.                     
  30. Field Number #4        
  31. Description            The handler procedure CommFigure will use when editing the
  32.                     preference file.
  33. Example                1    or    2    or    3
  34. Notes                1    - STR# Type Preferences when all the preferences are
  35.                     stored in one long STR# resources, similar to what Eudora 
  36.                     and Netscape use.
  37.                     2    - DATA Fork Preferences, similar to MacPPP
  38.                     3    - Other Resource Types, (ie PREF) - used by Homer etc
  39.                     
  40. Field Number #5    
  41. Description            The Resource ID of a STR# resource
  42. Example                128
  43. Notes                Leave empty for Data Fork or other Resource Type
  44.                     preferences
  45.                     
  46. Field Number #6
  47. Description            How many settings will be changed
  48. Example                3
  49. Notes                How many settings the module will modify in the target
  50.                     preference file. For example if you changed Email,
  51.                      Realname, and IRC Server that would be 3 settings (ie. 3)
  52.                      
  53. The remaining fields are for specific settings data. Each setting requires for
  54. fields so you will note that fields are grouped in fours. The first setting
  55. fields will be #7 through to #10 inclusive
  56.  
  57. Field Number #7        
  58. Description            STR# Field ID, DATA Fork Offset, Other Resource Type Offset
  59. Example                176        (convert Hex offsets into decimal please!)(DFType)
  60.                     77        (STR# Type)
  61.                     0         (other resource type - this will start writing to
  62.                              resource as character one)
  63. Notes                -
  64.  
  65. Field Number #8        
  66. Description            The Setting Type to be modified
  67. Example                4    (this would be the organisation settings)
  68. Notes                        1    Real name
  69.                             2    Email address
  70.                             3    Password
  71.                             4    Organisation
  72.                             5    Download Folder
  73.                             6    Homepage (default page)
  74.                             7    SMTP Server
  75.                             8    NNTP Server
  76.                             9    Archie Server
  77.                             10    Info-Mac Mirror Server
  78.                             11    IRC Server
  79.                             12    Ph Server
  80.                             13    Finger Server
  81.                             14    IRC Nickname
  82.                             15    Proxy Server
  83.                             16    Proxy Server Port
  84.                             17    Login Account
  85.                             18    University of Michigan Macintosh Mirrors 
  86.                             19  Download Folder Volume
  87.                             20  Download Folder Half Pathname    
  88.                     
  89.                     The Half Pathname returns something like :System
  90.                     Folder:Preferences:Netscape ─  - this could be used in
  91.                     programs that require a download folder volume in one
  92.                     setting and the rest of the pathname in another.
  93.                                                                                
  94. Field Number #9
  95. Description            The maximum length of the data to be written
  96. Example                20        (this means 20 characters is the max)
  97. Notes                
  98. Now this really caused me problems this part... this is
  99. probably the most important field... Anyway, this field control two things. The
  100. first is if the length of an edit text field is longer than this number the
  101. string is truncated when the preference file is edited. However if you put the
  102. number 0 in this field, there is no maximum length. However CommFigure will put
  103. null characters after the string has finished until it reaches the first null
  104. character it finds. This is so CommFigure kills any old remaining text that was
  105. left behind. The next thing is, a lot of programs use the first character of a
  106. string to measure the length, (so the first real character of the string will
  107. be the second character from the offset). If the program you are writing a
  108. module for does this, you must put a maximum length into this field, it it
  109. doesn't put in zero. You should definitely make some copies of preferences
  110. files when testing your module.
  111.  
  112. Field Number #10    
  113. Description            The Settings Resource ID
  114. Example                129
  115. Notes                Different settings may have different resource ID (have a
  116.                     look at the Fetch Preferences as you'll get the idea). 
  117.                     For each setting put the resource into this field. If 
  118.                     more than one setting is in the resource with the same ID, 
  119.                     just continue repeating the process for each successive 
  120.                     settings entry.
  121.  
  122.  
  123. NOTE WELL : OK - you probably couldn't understand that - just look at the
  124. modules that have been included and their related preference files and you'll
  125. get the idea. Make sure you back up the original preference files when testing
  126. your modules out.
  127.  
  128. Other Stuff
  129.  
  130. Please send me messages as to what other fields you would like to see, ie
  131. Default Fonts, WHOIS servers etc... I need to know which ones are popular and
  132. which ones aren't. 
  133.  
  134. Comments, suggestions, complaints, and proclaimations to kura@ins.co.nz
  135.  
  136. CommFigure. ⌐1996 Jonathan Dean
  137.